﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using AMG.DALProfile;

namespace AMG.Web
{
    public partial class header : System.Web.UI.UserControl
    {
        public string companyname = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            int UserID = AMG.Web.UI.Page.BasePage.GetCurrentUserID();
            AMG.DALSQLServer.DbBase DbBase = new AMG.DALSQLServer.DbBase();
            
            SqlParameter para = new SqlParameter("@UserID", UserID);
            companyname = (DbHelper.ExecuteScalar(CommandType.Text, "SELECT  UserName, ID FROM AMG_Proxy where ID=@UserID", para)).ToString();
            DataBind();
        }
    }
}